/*    */ package com.zimbra.cs.service.admin;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.soap.AdminConstants;
/*    */ import com.zimbra.common.soap.Element;
/*    */ import com.zimbra.cs.account.AccessManager.AttrRightChecker;
/*    */ import com.zimbra.cs.account.Config;
/*    */ import com.zimbra.cs.account.Provisioning;
/*    */ import com.zimbra.cs.account.accesscontrol.AdminRight;
/*    */ import com.zimbra.cs.account.accesscontrol.Rights.Admin;
/*    */ import com.zimbra.soap.ZimbraSoapContext;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ import java.util.Set;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class GetAllConfig
/*    */   extends AdminDocumentHandler
/*    */ {
/*    */   public Element handle(Element request, Map<String, Object> context)
/*    */     throws ServiceException
/*    */   {
/* 44 */     ZimbraSoapContext zsc = getZimbraSoapContext(context);
/* 45 */     Provisioning prov = Provisioning.getInstance();
/*    */     
/* 47 */     Config config = prov.getConfig();
/*    */     
/* 49 */     AdminAccessControl aac = checkRight(zsc, context, config, AdminRight.PR_ALWAYS_ALLOW);
/*    */     
/* 51 */     Element response = zsc.createElement(AdminConstants.GET_ALL_CONFIG_RESPONSE);
/* 52 */     encodeConfig(response, config, null, aac.getAttrRightChecker(config));
/*    */     
/* 54 */     return response;
/*    */   }
/*    */   
/*    */   public static void encodeConfig(Element e, Config config, Set<String> reqAttrs, AccessManager.AttrRightChecker attrRightChecker) {
/* 58 */     Map attrs = config.getUnicodeAttrs();
/* 59 */     ToXML.encodeAttrs(e, attrs, reqAttrs, attrRightChecker);
/*    */   }
/*    */   
/*    */   public void docRights(List<AdminRight> relatedRights, List<String> notes)
/*    */   {
/* 64 */     relatedRights.add(Rights.Admin.R_getGlobalConfig);
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/service/admin/GetAllConfig.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */